package com.demo.service;

import com.demo.dto.MessageDTo;
import com.demo.pojo.CommonResponseVo;

/**
 * @author oyz
 */
public class InternalMsgImpl extends AbstractMsgService implements MsgService {
    @Override
    public CommonResponseVo sendMsg(MessageDTo messageDTo) {
        MsgService service = super.chioce(messageDTo);
        if (service instanceof InternalMsgImpl) {
            CommonResponseVo responseVo = sendInternalMsg(messageDTo);
            return responseVo;
        }
        return null;
    }

    @Override
    protected CommonResponseVo sendInternalMsg(MessageDTo messageDTo) {
        // 通知
        notify(messageDTo);
        return null;
    }
}
